package com.ferry.taskflow.taskFlow.base;


import com.ferry.taskflow.taskFlow.domain.TaskResult;

/**
 * Created by daiyong
 */
public interface Task<RESULT> {

	RESULT execute();

	/**
	 * 任务执行成功
	 */
	void onSuccess(TaskResult taskResult, RESULT result);

	/**
	 * 任务执行失败
	 */
	void onFail(TaskResult taskResult, Throwable throwable);

}
